package day0602;

import java.util.Scanner;

public class File6 {



    public static void main(String[] args) {
        int  x=1;
        double money=30;
        //1.输入小时数据
        Scanner s=new Scanner(System.in);
        while(x<2147483647 ){//无线循环(死循环)

            if(x<=3 || money>0){
                System.out.println("请输入当前的小时数据：");
                int hour=s.nextInt();//用s.nextInt()输入int数据存入hour中
                if(0<hour  && hour<=12){
                    System.out.println(hour+"am");
                }else  if(12<hour  && hour<=24){
                    System.out.println(hour-12+"pm");
                }else {
                    System.out.println("您输入的数据无效");
                }
                money=money-10;
            }else{
                System.out.println("您已经没有使用本系统的权限了，请充值");
                money=s.nextDouble();
            }

            x++;
        }
    }




}
